
<script type="text/javascript">
    $(function () {
    $(".hover td").hover(function () {
    $(this).find("div").show();
    }, function () {
    $(this).find("div").hide();
    });
    });
</script>
<style type="text/css">
    #show_op{
        position: fixed;
    }
    #show_op table{
        border-collapse:collapse;
        border-color:#999;
        background: rgb(165, 208, 224);
        border:1px solid #fff;
    }
    #show_op table th{
        padding: 5px;
        font-weight: bold;
        text-align: center;
        border-color: #fff;
    }
    #show_op table td{
        min-width: 100px;
        text-align: center;
        padding: 5px;
        border-color: #fff;
    }
</style>
</head>
<body>
    <div class="admin">
        <div class="tab panel dux-box admin-panel">
            <div class="panel-head"><strong>下架商品</strong></div>
            <div class="padding border-bottom">
                <a href="JavaScript:void(0);" class="button button-small border-green">管理</a>
            </div>
            <div class="fixed-empty"></div>
            <form method="post" action="{:U('xiajia')}" name="formSearch" id="formSearch">
                <table class="tb-type1 noborder search">
                    <tbody>
                        <tr>
                            <th><label>商品名</label></th>
                            <td><input class="input input_big" type="text" name="goods_title" value=""></td>
                            <th>店铺</th>
                            <td><input class="input input-small-short" type="text" name="store_name" value=""></td>
                            <td><input  class="button bg-main" type="submit" value="查询" /></td>
                        </tr>
                    </tbody>
                </table>
            </form>
            <div style="text-align:right;"><a class="button" target="_blank" href="index.php?act=order&amp;op=index&amp;op=export_step1"><span>导出Excel</span></a></div>
            <table class="table tb-type2 nobdb">
                <thead>
                    <tr class="thead">
                        <th>序号</th>
                        <th>商品名称</th>
                        <th>店铺</th>
                        <th>商品货号</th>
                        <th class="align-center">进货价</th>
                        <th class="align-center">销售价</th>
                        <th class="align-center">市场价</th>
                        <th class="align-center">销量</th>
                        <th class="align-center">浏览次数</th>
                        <th class="align-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                <foreach  name="res" item="vo" key="key">
                    <tr class="hover" style="background: rgb(255, 255, 255);">
                        <td class="oGoods">{$vo['goods_id']}</td>
                        <td><a href="HOME_URL/Goods/{$v['goods_id']}">{$vo['goods_title']}</a></td>
                        <td>{$vo['store_name']}</td>
                        <td>{$vo['goods_number']}</td>
                        <td class="nowrap align-center">{$vo['goods_stockprice']}</td>
                        <td class="align-center">{$vo['goods_price']}</td>
                        <td class="align-center">{$vo['goods_markprice']}</td>
                        <td class="align-center">{$vo['goods_realsale']}</td>
                        <td class="align-center">{$vo['goods_hits']}</td>

                        <td class="w144 align-center">
                            <a class="js-del" href="javascript:" data="1" title="下架" onclick="shangjia({$vo['goods_id']})">上架</a> |
                            <a class="js-del" href="javascript:" data="1" title="下架" onclick="huishou({$vo['goods_id']})">删除</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
                <tfoot>
                    <tr class="tfoot">
                        <td colspan="15"><div class="pages clearfix">{$pages}</div></td>
                    </tr>
                </tfoot>
            </table>
        </div>
    </div>
    <div id="show_op" style="display: none;">
        <table border="" cellspacing="0" cellpadding="0">
            <tr>
                <th>商品图片</th>
                <th>品牌</th>
                <th>货号</th>
                <th>价格</th>
                <th>数量</th>
                <th>属性</th>
                <th>小计</th>
            </tr>
            <tr>
                <td><img style="width: 120px;display: block;" src="img/login-banner.jpg"/></td>
                <td><img style="width: 120px;display: block;" src="img/login-banner.jpg"/></td>
                <td>100</td>
                <td>￥00</td>
                <td>1</td>
                <td>白色</td>
                <td>￥00</td>
            </tr>
        </table>
    </div>
    <script>
        function shangjia(dete)
        {
        layer.confirm(
                '上架该商品？',
        {btn: ['是的', '算了'] },
                function(){
                dete = {goods_id:dete};
                var p = Aajax('http://admin.taodudu.com/Goods/goods_del_shangjia', dete);
                if (p.n){
                layer.msg('商品已上架');
                setTimeout("history.go(0)", 1500);
                } else{
                layer.msg('出错请稍后再试');
                }
                }
        );
        }

        function huishou(dete)
        {
        layer.confirm(
                '确定要放入回收站？',
        {btn: ['是的', '算了'] },
                function(){
                dete = {goods_id:dete};
                var p = Aajax('http://admin.taodudu.com/Goods/goods_del_huishou', dete);
                if (p.n){
                layer.msg('商品已放入回收站');
                setTimeout("history.go(0)", 1500);
                } else{
                layer.msg('出错请稍后再试');
                }
                }
        );
        }


    </script>